public class StockPriceComparator implements Comparator {
	public int compare(Object s1, Object s2) {
		double stock1 = ((ActiveOrder) s1).order.getSecurityPrice();
		double stock2 = ((ActiveOrder) s2).order.getSecurityPrice();

		if (stock1 > stock2)
			return 1;
		else if (stock1 < stock2)
			return -1;
		else
			return 0;
	}
}
